package com.hwhhhh.graduationproject.utils;

import lombok.Data;

/**
 * @Description detail
 * Created by Hwhhhh on 2021/3/2 15:17
 */
@Data
public class ResponseData {
    private int code;
    private String msg;
    private Object data;

    public ResponseData() {
        this.code = ResponseCode.SUCCESS.code;
        this.msg = ResponseCode.SUCCESS.msg;
    }

    public ResponseData(ResponseCode responseCode) {
        this.code = responseCode.code;
        this.msg = responseCode.msg;
    }

    public ResponseData(ResponseCode responseCode, Object data) {
        this.code = responseCode.code;
        this.msg = responseCode.msg;
        this.data = data;
    }

    public ResponseData(int code, String msg) {
        this.msg = msg;
        this.code = code;
    }

    public ResponseData(Object o) {
        this();
        this.data = o;
    }
}
